package com.atguigu.yygh.vo.user;

import java.util.Arrays;

public class Test01 {
    public static void main(String[] args) {
        int[] a = {3,6,9,2,1};
        int temp = 0;
        for (int i = 0; i < a.length-1; i++) {
            for (int j = 0; j < a.length-i-1; j++) {
                if(a[j+1]<a[j]){
                    temp = a[j];
                    a[j] = a[j+1];
                    a[j+1] = temp;
                }
            }
        }
        System.out.println(Arrays.toString(a));
    }


}
